import config from "@/config"
import http from "@/utils/request"
console.log(config.API_URL)
export default {
	token: {
		url: `${config.API_URL}/token`,
		name: "登录获取TOKEN",
		post: async function (data = {}) {
			return await http.post(this.url, data);
		}
	},

	//mm
	// 验证码
	captchaImage: {
		url: `${config.API_URL}/core/system/login/captchaImage`,
		name: "获取验证码",
		post: async function (data, config = {}) {
			return await http.get(this.url, data, config);
		}
	},
	login: {
		url: `${config.API_URL}/core/system/login/doLogin`,
		name: "用户登录",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	outLogin: {
		url: `${config.API_URL}/logout`,
		name: "用户登录",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	avatar: {
		url: `${config.API_URL}/core/system/user/doUploadHeadPortrait`,
		name: "用户登录",
		post: async function (data, config = {}) {
			return await http.post(this.url, data,  { headers: { 'Content-Type': 'multipart/form-data' } });
		}
	},
	
	// 注册
	// /app/userAppService/json/saveRegisteUser.do


	// 获取用户信息
	getBaseUserInfo: {
		url: `${config.API_URL}/core/system/user/getUserInfo`,
		name: "获取用户信息",
		post: async function (data, config = {}) {
			return await http.get(this.url, data, config);
		}
	},
	updatePassword: {
		url: `${config.API_URL}/core/system/user/updatePassword`,
		name: "修改密码",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},

	//消息中心
	queryMessageList: {
		url: `${config.API_URL}/core/system/message/queryMessageList`,
		name: "消息中心",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	//消息条数
	msgCount: {
		url: `${config.API_URL}/core/system/message/countMessageRecords`,
		name: "消息条数",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	//更新消息已读状态
	updateReadedStatus: {
		url: `${config.API_URL}/core/system/message/updateReadedStatus`,
		name: "更新消息已读状态",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	//统计出差计划
	countEmployeeTripPlans: {
		url: `${config.API_URL}/main/trip/employeePlanReport/countEmployeeTripPlans`,
		name: "统计出差计划",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	countSampleAuditTableNum: {
		url: `${config.API_URL}/main/om/orderSumReport/countOrderNum`,
		name: "样品评审表数",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	



}
